import request from "@/utils/request";

//获取所有项目数据
export function getAllProject({current, size}) {
    return request({
        // TOFIX: 添加路径prefix，如/project
        url: '/project/getAllProject',
        method: 'get',
        params: {current, size}
    })
}

//根据类型获取项目数据
export function getProjectByKw({type, kw, current, size}) {
    return request({
        url: '/project/getProjectByKW',
        method: 'post',
        data: {type, kw, current, size}
    })
}

//根据教师名列表获取教师研究方向
// export function getTeasDirection(nameList) {
//     return request({
//         url: '/getTeasDirection',
//         method: 'post',
//         data: nameList,
//     })
// }
//获取前四个教师研究方向
export function getLateDirections(number){
    return request({
        url:'/getLateDirections',
        method:'get',
        params:{number}
    })
}

//获取教师研究方向及详细内容
export function getDirectionByPage({current, size}) {
    return request({
        url: '/getDirectionByPage',
        method: 'get',
        params: {current, size}
    })
}

//获取所有教师研究方向及详细内容
export function getAllTeachersDirection(){
    return request({
        url:'/getAllTeachersDirection',
        method:'post',
    })
}

//获取比赛详细信息
export function getProjectDetailByName({name}) {
    return request({
        url: '/project/getProjectDetailByName',
        method: 'get',
        params: {name}
    })
}


